package com.dundun.controller;

import com.dundun.common.utils.Ajax;
import com.dundun.service.MessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "即时通讯相关接口")
@RequestMapping("/")
@RestController
public class messageController {
    @Resource
    private MessageService messageService;

    @ApiOperation(value = "通过双方用户获取聊天记录")
    @GetMapping("/GetMessageHistory")
    public Ajax GetMessageHistory(int user1, int user2) {
        return Ajax.success().put("data", "the return data...");
    }

    @ApiOperation(value = "获取指定用户的消息列表")
    @GetMapping("/GetMessageList")
    public Ajax GetMessageList(int userId) {
        return Ajax.success().put("data", "the return data...");
    }

    @ApiOperation(value = "用户发送消息")
    @PostMapping("/SendMessage")
    public Ajax GetMessageList(int user_from,int user_to,String content) {
        return Ajax.success().put("data", "the return data...");
    }
}
